<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<s:set value="currentDate" var="currentDate" />
<s:set value="item.endTime" var="item.endTime" />

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<div class="blue-text16" style="margin: 0px 0px 0px 0px">
					Print Item <s:property value="item.title" />
				</div>
				<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
				<div style="margin: 0px 0px 12px 0px">
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td height="200" valign="top">
									<table border="0" cellpadding="8" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td valign="top" width="50%">
													<table style="border-collapse: collapse;" border="0"
														cellpadding="2" cellspacing="0">

														<tbody>
														<s:if test="item.itemtype.id == 1">
															<tr>
																<td align="right" valign="top" class="search-text" width="47%">
																	Starting bid:
																</td>
																<td align="left" valign="top" class="common-text">
																	<b><s:property value="item.startBid" /> <s:property value="item.currency.currency" /> </b>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" class="search-text">
																	Current bid:
																</td>
																<td align="left" valign="top" class="common-text">
																	<b><s:property value="item.currentBid" /> <s:property value="item.currency.currency" /> </b>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" class="search-text">
																	Bid increment:
																</td>
																<td align="left" valign="top" class="common-text">
																	<b><s:property value="item.increment" /> <s:property value="item.currency.currency" /></b>
																</td>
															</tr>
														</s:if>
														<s:if test="item.itemtype.id != 6 && item.itemtype.id != 1">
															<tr>
																<td align="right" valign="top" class="search-text" width="47%">
																	<s:text name="sellingauction.price" />
																</td>
																<td align="left" valign="top" class="common-text">
																	<b><s:property value="item.startBid" /> <s:property value="item.currency.currency" /> </b>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" class="search-text">
																	<s:text name="showitem.quantity" />
																</td>
																<td align="left" valign="top" class="common-text">
																	<b><s:property value="item.quantity" /> <font color="blue"> (Available: <s:property value="item.quantity - item.sold" />, Sold: <s:property value="item.sold" />)</font> </b>
																</td>
															</tr>
														</s:if>
															<tr>
																<td align="right" valign="top" nowrap="nowrap"
																	class="search-text">
																	<s:text name="showitem.started" />
																</td>
																<td align="right" valign="top" class="common-text">
																	<b><font color="#0000ff"><s:date name="item.startTime" format="EEEE, dd.MM.yyyy HH:mm" /></font></b>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" nowrap="nowrap"
																	class="search-text">
																	<s:text name="showitem.currenttime" />
																</td>

																<td align="right" valign="top" class="common-text">
																	<b><font color="#0000ff"><s:date name="currentDate" format="EEEE, dd.MM.yyyy HH:mm" /></font> </b>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" nowrap="nowrap"
																	class="search-text">
																	<s:text name="showitem.end" />
																</td>
																<td align="right" valign="top" class="common-text">
																	<b><font color="#0000ff"><s:date name="item.endTime" format="EEEE, dd.MM.yyyy HH:mm" /></font> </b>
																</td>

															</tr>
														<s:if test="item.itemtype.id != 6">
															<tr>
																<td align="right" valign="top" nowrap="nowrap"
																	class="search-text">
																	<s:text name="sellingauction.timeleft" />
																</td>
																<td align="right" valign="top" class="common-text">
																	<b> <font color="#006600"> <ilayer
																				id="CountDown" width="200" height="18"
																				visibility="hide"> <layer id="CountDown1"
																				width="200" height="18" left="0" top="0"><span
																			id="CountDown2"></span> </layer> </ilayer>
																	</font> </b>
																</td>
															</tr>
														</s:if>
														</tbody>
													</table>
												</td>
												<td valign="top" width="50%">
													<table style="border-collapse: collapse;" border="0"
														cellpadding="2" cellspacing="0" width="100%">
														<tbody>
															<tr>

																<td width="35%" align="right" valign="top" nowrap="nowrap"
																	class="search-text">
																	<s:text name="showitem.seller" />
																</td>
																<td align="left" valign="top" class="common-text">
																	<a href="viewMyFeedback.htm?userId=<s:property value="item.userId.userId" />"><b><s:property value="item.userId.userId" /></b> </a> (1)
																	<s:if test="userInfo.verified2">
																		<img src="images/verified2.gif" alt="Verified Plus Plus User" align="middle" border="0">
																	</s:if>
																	<s:elseif test="userInfo.verified1">
																		<img src="images/verified1.gif" alt="Verified Plus User" align="middle" border="0">
																	</s:elseif>
																	<s:elseif test="userInfo.verified">
																		<img src="images/verified.gif" alt="Verified User" align="middle" border="0">
																	</s:elseif>
																	<s:if test="userInfo.power">
																		<img src="images/power.gif" alt="Power User" align="middle" border="0">
																	</s:if>
																	<s:if test="userAboutMe != null">
																		<a href="aboutMe.htm?userId=<s:property value="item.userId.userId" />"><img src="images/aboutme.gif" alt="me" align="middle" border="0"></a>
																	</s:if>
																</td>
															</tr>
														<s:if test="item.itemtype.id == 1">
															<tr>
																<td align="right" valign="top" class="search-text">
																	High bidder:
																</td>
																<td valign="top" class="common-text">
																	<a href="viewMyFeedback.htm?userId=<s:property value="auctionBids.user.userId" />"><b><s:property value="auctionBids.user.userId" /> </b></a>
																	<s:if test="bidderUserInfo.verified2">
																		<img src="images/verified2.gif" alt="Verified Plus Plus User" align="middle" border="0">
																	</s:if>
																	<s:elseif test="bidderUserInfo.verified1">
																		<img src="images/verified1.gif" alt="Verified Plus User" align="middle" border="0">
																	</s:elseif>
																	<s:elseif test="bidderUserInfo.verified">
																		<img src="images/verified.gif" alt="Verified User" align="middle" border="0">
																	</s:elseif>
																	<s:if test="bidderUserInfo.power">
																		<img src="images/power.gif" alt="Power User" align="middle" border="0">
																	</s:if>
																	<s:if test="bidderUserAboutMe != null">
																		<a href="aboutMe.htm?userId=<s:property value="auctionBids.user.userId" />"><img src="images/aboutme.gif" alt="me" align="middle" border="0"></a>
																	</s:if>
																</td>
															</tr>
															<tr>
																<td align="right" valign="top" class="search-text">
																	Nr. of bids:
																</td>
																<td valign="top" class="common-text">
																	<b><s:property value="item.bids.size" /> </b>
																</td>
															</tr>
														</s:if>
															<tr>
																<td align="right" valign="top" class="search-text">
																	<s:text name="showitem.location" />
																</td>
																<td valign="top" class="common-text">
																	<b><s:property value="item.userId.city" /> <s:property value="item.userId.zip" /></b>
																</td>

															</tr>
															<tr>
																<td align="right" valign="top" class="search-text">
																	<s:text name="showitem.region" />
																</td>
																<td valign="top" class="common-text">
																	<b><s:property value="item.userId.region.categoryName" />, <s:property value="item.userId.country.categoryName" />, <s:property value="item.userId.state.categoryName" /></b>
																</td>
															</tr>

															<tr>
																<td align="right" valign="top" class="search-text">
																	<s:text name="showitem.language" />
																</td>

																<td valign="top" class="common-text">
																	<b><s:property value="item.itemLanguage.languageName" /></b>
																</td>
															</tr>
														</tbody>
													</table>
												</td>

											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="6" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td class="common-bold-text" colspan="2">
													<s:text name="showitem.description" />
												</td>
											</tr>
											<tr>
												<td align="center" width="50%">
													<div id="s3" class="pics">
													<s:if test="%{itemAuctionImages != null && itemAuctionImages.size > 0}">
														<s:iterator value="itemAuctionImages">
															<s:if test="id.contentType == 'image/jpeg' || id.contentType == 'image/gif' || id.contentType == 'image/png' || id.contentType == 'image/bmp'">
																<img src="<s:property value="id.imagePath" />" height="200" width="200">
															</s:if>
														</s:iterator>
													</s:if>
													<s:elseif test="%{itemAuctionImages == null}">
														<img src="images/no_image.gif" height="200" width="200">
													</s:elseif>
													</div>
													<script type="text/javascript">
														$('#s3').cycle({
														    fx:     'fade',
														    speed:   300,
														    timeout: 3000,
														    next:   '#s3',
														    pause:   1
														});
													</script>
												</td>
												<td align="justify" valign="top" class="common-text">
													<s:property value="item.description" escape="false" />
												</td>
											</tr>
											<tr>
												<td align="center" colspan="2">
													<s:if test="%{itemAuctionImages != null && itemAuctionImages.size > 0}">
														<s:iterator value="itemAuctionImages">
															<s:if test="id.contentType != 'image/jpeg' || id.contentType != 'image/gif' || id.contentType != 'image/png' || id.contentType != 'image/bmp'">
																<s:if test="id.contentType == 'application/msword'">
																	<a href="servlet/download?filename=<s:property value="id.imagePath" />"><img src="images/doc.jpeg" border="0" height="20" width="20" /></a>
																</s:if>
																<s:elseif test="id.contentType == 'text/plain'">
																	<a href=""><img src="images/txt.jpeg" border="0" height="20" width="20" /></a>
																</s:elseif>
																<s:elseif test="id.contentType == 'application/pdf'">
																	<a href=""><img src="images/pdf.jpeg" border="0" height="20" width="20" /></a>
																</s:elseif>
																<s:elseif test="id.contentType == 'audio/x-wav'">
																	<a href=""><img src="images/wav.jpeg" height="20" width="20" /></a>
																</s:elseif>
																<s:elseif test="id.contentType == 'audio/midi'">
																	<a href=""><img src="images/mid.jpeg" border="0" height="20" width="20" /></a>
																</s:elseif>
																<s:elseif test="id.contentType == 'video/quicktime'">
																	<a href=""><img src="images/mov.jpeg" border="0" height="20" width="20" /></a>
																</s:elseif>
																<s:elseif test="id.contentType == 'video/msvideo'">
																	<a href=""><img src="images/avi.jpeg" border="0" height="20" width="20" /></a>
																</s:elseif>
															</s:if>
														</s:iterator>
													</s:if>
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td class="common-bold-text">
													Shipping &amp; Handling
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td style="padding: 8px;">
									<table width="100%" border="0" cellpadding="0" cellspacing="2">
										<tbody>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b><s:text name="showitem.shiptime" /> </b>
												</td>
												<td class="common-text">
													<s:property value="item.shipTime.name" />
												</td>
											</tr>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b><s:text name="showitem.Will" /> </b>
												</td>
												<td class="common-text">
													<s:iterator value="shipTo" status="row">
														<s:property value="%{shipTo[#row.index]}" /><s:if test="#row.last == false">, </s:if>
													</s:iterator>
												</td>
											</tr>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b><s:text name="showitem.shippingcost" /> </b>
												</td>
												<td class="common-text">
													<s:property value="item.shipPayment" /> <s:property value="item.currency.currency" /> Buyer Pays Actual Shipping Cost
												</td>
											</tr>

										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td class="common-bold-text">
													Payment methods
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td style="padding: 8px;">
									<table width="100%" border="0" cellpadding="0" cellspacing="2">
										<tbody>
											<tr>
												<td align="right" valign="top" class="search-text" width="40%">
													<b>Additional payment instructions: </b>
												</td>
												<td class="common-text">
													<s:property value="item.paymentDetails" />&nbsp;
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tbody>
											<tr>
												<td class="common-bold-text">
													Return policy
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
								<td style="padding: 8px;">
									<table width="100%" border="0" cellpadding="0" cellspacing="2">
										<tbody>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b>Return period: </b>
												</td>
												<td class="common-text">
													<s:property value="item.returnPeriod.name" />
												</td>
											</tr>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b>Refund method: </b>
												</td>
												<td class="common-text">
													<s:property value="item.returnMethod.name" />
												</td>
											</tr>
											<tr>
												<td align="right" valign="top" class="search-text">
													<b>Return policy: </b>
												</td>
												<td class="common-text">
													<s:property value="item.returnDetails" /> <s:property value="item.currency.currency" /> Buyer Pays Actual Shipping Cost
												</td>
											</tr>

										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</td>
		</tr>
	</table>
	<!-------------Count down counter start----------------->
	<script language="JavaScript">
var now=<%= ((Date) pageContext.getAttribute("currentDate")).getTime() %>;
var passed = '<font color="#CC0000">Closed</font>';
var crosscount='';
function ShowZeroFilled(inValue)
{
 if (inValue > 9) return "" + inValue;
 return "0" + inValue;
}
function Start_CountDown()
{
 if(document.layers)
 {
  document.CountDown.visibility="show";
 }
 else
 {
  if (document.all || document.getElementById) crosscount=document.getElementById&&!document.all?document.getElementById("CountDown2") : CountDown2;
 }
 countdown();
}
window.onload=Start_CountDown;
function countdown()
{
 dd=<%= ((Date) pageContext.getAttribute("item.endTime")).getTime() %>-now;
 now+=1000;
 dday=Math.floor(dd/(60*60*1000*24)*1);
 dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1);
 dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
 dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
//if passed day of occasion
 if(dday<=-1)
 {
  if (document.layers)
  {
   document.CountDown.document.CountDown1.document.write(passed);
   document.CountDown.document.CountDown1.document.close();
  }
  else if(document.all||document.getElementById)
  {
   crosscount.innerHTML=passed;
  }
  return
 }
//else, if not yet
 else
 {
  dhour = ShowZeroFilled(dhour);
  dmin = ShowZeroFilled(dmin);
  dsec = ShowZeroFilled(dsec);
  if (dday == 0)
  {
   daystime = '0 Days';
  }
  else if (dday== 1)
  {
   daystime = dday+' Day +';
  }
  else
  {
   daystime = dday+'  Days + ';
  }
  if (document.layers)
  {
   document.CountDown.document.CountDown1.document.write(daystime+dhour+":"+dmin+":"+dsec);
   document.CountDown.document.CountDown1.document.close();
  }
  else if (document.all||document.getElementById)
  {
   crosscount.innerHTML=daystime+dhour+":"+dmin+":"+dsec;
  }
 }
 setTimeout("countdown()",1000)
}
</script>